interface DndProps {
    scale?: number;
    children: React.ReactNode;
}

const Dnd: React.FC<DndProps> = ({ scale = 1, children }) => {
    console.log(children,scale)
    const parentRef = useRef<HTMLDivElement | null>(null);
    // const [isDragging, setIsDragging] = useState(false);
    // const [offset, setOffset] = useState({ x: 0, y: 0 });
    // const [selectDom, setSelectDom] = useState<HTMLElement | null>(null);

    useEffect(() => {
        const parentDom = parentRef.current;
        if (!parentDom) return;
        console.log(children)
        // const handleMouseDown = (e: MouseEvent) => {
        //     const target = e.target as HTMLElement;
        //     if (target && target.classList.contains('lego-editor-container-panel-component-item')) {
        //         setIsDragging(true);
        //         setSelectDom(target);
        //         setOffset({
        //             x: (e.clientX - target.offsetLeft * scale) / scale,
        //             y: (e.clientY - target.offsetTop * scale) / scale,
        //         });
        //         target.style.cursor = 'grabbing';
        //     }
        // };


    }, []);

    return <div ref={parentRef} style={{ position: 'relative' }}>{children}</div>;
};

export default Dnd;